package mh.interfaces;

import java.io.File;

import mh.MagicHogwarts;

/**
 * Class that contains all the constants used in the game.
 * 
 * @author Gianmarco Laggia
 * 
 */
public interface Constants {

	/** The size of a standard tile */
	public static final int		TILE_SIZE			= 32;

	/** The size of a standard tile, double type version */
	public static final double	TILE_SIZE_DBL		= 32.0;

	/** The number of visible rows */
	public static final int		VISIBLE_ROWS		= 23;

	/** The number of visible columns */
	public static final int		VISIBLE_COLUMNS		= 31;

	/** The height of the main window */
	public static final int		WINDOW_HEIGHT		= VISIBLE_ROWS * TILE_SIZE;

	/** The width of the main window */
	public static final int		WINDOW_WIDTH		= VISIBLE_COLUMNS * TILE_SIZE;

	/** The central position of the sprite (x coord) */
	public static final int		CENTRAL_COLUMN		= 15;

	/** The central position of the sprite (y coord) */
	public static final int		CENTRAL_ROW			= 11;

	/** The central position in pixel, top left corner of the tile (x coord) */
	public static final int		CENTRAL_COLUMN_PX	= CENTRAL_COLUMN * TILE_SIZE;

	/** The central position in pixel, top left corner of the tile (y coord) */
	public static final int		CENTRAL_ROW_PX		= CENTRAL_ROW * TILE_SIZE;

	/** The normal speed of a spell. TODO maybe changes between players and players. */
	public static final int		SPELL_SPEED			= 200;

	/** The <b>Absolute</b> path of the main folder that contains the jar and all the files. */
	public static final String	MAIN_FOLDER			= System.getProperty("user.home") + "/MagicHogwarts/";

	/** The number of time the client would try to reconnect to the server before die */
	public static final int		MAX_RECONNECTIONS	= 10;

	/** The string used in a file to identify a comment line */
	public static final String	COMMENT_STARTER		= ";";

	/** The string used in a file to identify a comment line */
	public static final int		VELOCITY			= 120;

	/** The actual jar file where the class is run */
	public static final File	JAR_FILE			= (MagicHogwarts.class.getProtectionDomain().getCodeSource().getLocation() == null ? null : new File(
															MagicHogwarts.class.getProtectionDomain().getCodeSource().getLocation().getPath()));

	/** The path to the main folder where the file .jar is run */
	public static final String	BASE_DIRECTORY		= (JAR_FILE != null ? JAR_FILE.getAbsolutePath().replace(JAR_FILE.getName(), "")
															: "/Users/Gianmarco/Documents/java/MagicHogwarts/");

	public static final int		F_INTACT			= 0x0001;
	public static final int		F_DAMAGED			= 0x0002;
	public static final int		F_BROKEN			= 0x0004;
	public static final int		F_BLASTED			= 0x0008;
	public static final int		F_BURNED			= 0x0010;
	public static final int		F_OPEN				= 0x0020;
	public static final int		F_CLOSED			= 0x0040;
	public static final int		F_LOCKED			= 0x0080;
	public static final int		F_BURNING			= 0x0100;
	public static final int		F_DUSTY				= 0x0200;
	public static final int		F_WET				= 0x0400;
	public static final int		F_FROZEN			= 0x0800;
	public static final int		F_WRITTEN			= 0x1000;
	public static final int		F_FLOATING			= 0x2000;
	public static final int		F_HIDDEN			= 0x4000;

}
